home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer 2.0 / Internet Surfer 2.0 (Wayzata Technology) (1996).iso / pc / text / mac / faqs.161 < prev    next >
Encoding:
Text File  |  1996-02-12  |  27.9 KB  |  656 lines

  1. Frequently Asked Questions (FAQS);faqs.161
  2.  
  3.  
  4.  
  5. RICHARD SWINBURNE
  6.  
  7. "The Existence of God (Revised Edition)", Clarendon Paperbacks, Oxford
  8. This book is the second volume in a trilogy that began with "The Coherence of
  9. Theism" (1977) and was concluded with "Faith and Reason" (1981).  In this
  10. work, Swinburne attempts to construct a series of inductive arguments for the
  11. existence of God.  His arguments, which are somewhat tendentious and rely
  12. upon the imputation of late 20th century western Christian values and
  13. aesthetics to a God which is supposedly as simple as can be conceived, were
  14. decisively rejected in Mackie's "The Miracle of Theism".  In the revised
  15. edition of "The Existence of God", Swinburne includes an Appendix in which he
  16. makes a somewhat incoherent attempt to rebut Mackie.
  17.  
  18. J. L. MACKIE
  19. "The Miracle of Theism", Oxford
  20. This (posthumous) volume contains a comprehensive review of the principal
  21. arguments for and against the existence of God.  It ranges from the classical
  22. philosophical positions of Descartes, Anselm, Berkeley, Hume et al, through
  23. the moral arguments of Newman, Kant and Sidgwick, to the recent restatements
  24. of the classical theses by Plantinga and Swinburne.  It also addresses those
  25. positions which push the concept of God beyond the realm of the rational,
  26. such as those of Kierkegaard, Kung and Philips, as well as "replacements for
  27. God" such as Lelie's axiarchism.  The book is a delight to read - less
  28. formalistic and better written than Martin's works, and refreshingly direct
  29. when compared with the hand-waving of Swinburne.
  30.  
  31. JAMES A. HAUGHT
  32. "Holy Horrors: An Illustrated History of Religious Murder and Madness",
  33.  Prometheus Books
  34. Looks at religious persecution from ancient times to the present day -- and
  35. not only by Christians.
  36. Library of Congress Catalog Card Number 89-64079. 1990.
  37.  
  38. NORM R. ALLEN, JR.
  39. "African American Humanism: an Anthology"
  40. See the listing for African Americans for Humanism above.
  41.  
  42. GORDON STEIN
  43. "An Anthology of Atheism and Rationalism", Prometheus Books
  44. An anthology covering a wide range of subjects, including 'The Devil, Evil
  45. and Morality' and 'The History of Freethought'.  Comprehensive bibliography.
  46.  
  47. EDMUND D. COHEN
  48. "The Mind of The Bible-Believer", Prometheus Books
  49. A study of why people become Christian fundamentalists, and what effect it
  50. has on them.
  51.  
  52.                                 Net Resources
  53.  
  54. There's a small mail-based archive server at mantis.co.uk which carries
  55. archives of old alt.atheism.moderated articles and assorted other files.  For
  56. more information, send mail to archive-server@mantis.co.uk saying
  57.  
  58.    help
  59.    send atheism/index
  60.  
  61. and it will mail back a reply.
  62.  
  63.  
  64. mathew
  65. Xref: bloom-picayune.mit.edu alt.binaries.sounds.misc:3805 alt.binaries.sounds.d:1998 comp.dsp:4887 news.answers:4659
  66. Path: bloom-picayune.mit.edu!enterpoop.mit.edu!ira.uka.de!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!news.netmbx.de!Germany.EU.net!mcsun!sun4nl!cwi.nl!guido
  67. From: guido@cwi.nl (Guido van Rossum)
  68. Newsgroups: alt.binaries.sounds.misc,alt.binaries.sounds.d,comp.dsp,news.answers
  69. Subject: Changes to: FAQ: Audio File Formats (version 2.9)
  70. Message-ID: <audio-diff_724600938@charon.cwi.nl>
  71. Date: 17 Dec 92 14:02:47 GMT
  72. Expires: 14 Jan 93 14:02:18 GMT
  73. Sender: news@cwi.nl
  74. Reply-To: guido@cwi.nl
  75. Followup-To: alt.binaries.sounds.d,comp.dsp
  76. Lines: 101
  77. Approved: news-answers-request@MIT.Edu
  78. Supersedes: <audio-diff_722270826@charon.cwi.nl>
  79.  
  80. Archive-name: audio-fmts/diff
  81. Submitted-by: Guido van Rossum <guido@cwi.nl>
  82. Version: 2.9
  83. Last-modified: 17-Dec-1992
  84.  
  85. *** A2.8    Fri Nov 20 15:45:24 1992
  86. --- A2.9    Thu Dec 17 15:00:59 1992
  87. ***************
  88. *** 46,47 ****
  89. --- 46,48 ----
  90.     U-LAW and A-LAW definitions
  91. +   AVR File Format
  92.  
  93. ***************
  94. *** 68,69 ****
  95. --- 69,76 ----
  96.  
  97. + NEWSFLASH: This FAQ is now also available in distributed hypertext
  98. + form!  If you have a WWW browser and direct Internet access you can
  99. + point it to "http://voorn.cwi.nl/audio-formats/a00.html".  (WWW is the
  100. + CERN World-Wide Web initiative; for more info, telnet or ftp to
  101. + info.cern.ch.)
  102. +
  103.   Send updates, comments and questions to <guido@cwi.nl>; flames to
  104. ***************
  105. *** 156,158 ****
  106.                   rate; the latter is precisely 22254.545454545454 but
  107. !                 usually misquoted as 22000.
  108.  
  109. --- 163,167 ----
  110.                   rate; the latter is precisely 22254.545454545454 but
  111. !                 usually misquoted as 22000.  (Historical note:
  112. !                 22254.5454... was the horizontal scan rate of the
  113. !                 original 128k Mac.)
  114.  
  115. ***************
  116. *** 208,210 ****
  117.   32 kbits/sec ADPCM algorithm is available by ftp from ftp.cwi.nl as
  118. ! /pub/adpcm.shar.
  119.  
  120. --- 217,221 ----
  121.   32 kbits/sec ADPCM algorithm is available by ftp from ftp.cwi.nl as
  122. ! /pub/adpcm.shar.  (** NOTE: if you are using v1.0, you should get
  123. ! v1.1, released 17-Dec-1992, which fixes a serious bug -- the quality
  124. ! of v1.1 is claimed to be better than uLAW **)
  125.  
  126. ***************
  127. *** 270,271 ****
  128. --- 281,283 ----
  129.   Atari STe,TT        8               50k                  2
  130. + Atari Falcon 030    16              50k                  8(st)
  131.   Amiga               8               ~29k                 4(st)
  132. ***************
  133. *** 306,307 ****
  134. --- 318,326 ----
  135.  
  136. + Here's some info about the newest Atari machine, the Falcon030.  This
  137. + machine has stereo 16 bit CODECs and a 32 MHz Motorola 56001 that can
  138. + handle 8 channels of 16 bit audio, up to 50 khz/channel with
  139. + simultaneous playback and record.  The Falcon DMA sound engine is also
  140. + compatible with the 8 bit stereo DMA used on the STe and TT. All of
  141. + these systems use signed data.
  142. +
  143.   On the NeXT, the Motorola 56001 DSP chip is programmable and you can
  144. ***************
  145. *** 1477,1478 ****
  146. --- 1496,1529 ----
  147.  
  148. + ------------------------------------------------------------------------
  149. + AVR File Format
  150. + ---------------
  151. +
  152. + From: hyc@hanauma.Jpl.Nasa.Gov (Howard Chu)
  153. +
  154. + A lot of PD software exists to play Mac .snd files on the ST. One other
  155. + format that seems pretty popular (used by a number of commercial packages)
  156. + is the AVR format (from Audio Visual Research). This format has a 128 byte
  157. + header that looks like this:
  158. +
  159. +         char magic[4]="2BIT";
  160. +         char name[8];           /* null-padded sample name */
  161. +         short mono;             /* 0 = mono, 0xffff = stereo */
  162. +         short rez;              /* 8 = 8 bit, 16 = 16 bit */
  163. +         short sign;             /* 0 = unsigned, 0xffff = signed */
  164. +         short loop;             /* 0 = no loop, 0xffff = looping sample */
  165. +         short midi;             /* 0xffff = no MIDI note assigned,
  166. +                                    0xffXX = single key note assignment
  167. +                                    0xLLHH = key split, low/hi note */
  168. +         long rate;              /* sample frequency in hertz */
  169. +         long size;              /* sample length in bytes or words (see rez) */
  170. +         long lbeg;              /* offset to start of loop in bytes or words.
  171. +                                    set to zero if unused. */
  172. +         long lend;              /* offset to end of loop in bytes or words.
  173. +                                    set to sample length if unused. */
  174. +         short res1;             /* Reserved, MIDI keyboard split */
  175. +         short res2;             /* Reserved, sample compression */
  176. +         short res3;             /* Reserved */
  177. +         char ext[20];           /* Additional filename space, used
  178. +                                    if (name[7] != 0) */
  179. +         char user[64];          /* User defined. Typically ASCII message. */
  180.   ------------------------------------------------------------------------
  181. Xref: bloom-picayune.mit.edu alt.binaries.sounds.misc:3804 alt.binaries.sounds.d:1997 comp.dsp:4886 news.answers:4658
  182. Path: bloom-picayune.mit.edu!enterpoop.mit.edu!ira.uka.de!math.fu-berlin.de!news.netmbx.de!Germany.EU.net!mcsun!sun4nl!cwi.nl!guido
  183. From: guido@cwi.nl (Guido van Rossum)
  184. Newsgroups: alt.binaries.sounds.misc,alt.binaries.sounds.d,comp.dsp,news.answers
  185. Subject: FAQ: Audio File Formats (version 2.9)
  186. Message-ID: <audio-fmts_724600938@charon.cwi.nl>
  187. Date: 17 Dec 92 14:02:32 GMT
  188. Expires: 14 Jan 93 14:02:18 GMT
  189. Sender: news@cwi.nl
  190. Reply-To: guido@cwi.nl
  191. Followup-To: alt.binaries.sounds.d,comp.dsp
  192. Lines: 1518
  193. Approved: news-answers-request@MIT.Edu
  194. Supersedes: <audio-fmts_722270826@charon.cwi.nl>
  195.  
  196. Archive-name: audio-fmts/part1
  197. Submitted-by: Guido van Rossum <guido@cwi.nl>
  198. Version: 2.9
  199. Last-modified: 17-Dec-1992
  200.  
  201. FAQ: Audio File Formats (version 2.9)
  202. =====================================
  203.  
  204. Table of contents
  205. -----------------
  206.  
  207. Introduction
  208. Device characteristics
  209. Popular sampling rates
  210. Compression schemes
  211. Current hardware
  212. File formats
  213. File conversions
  214. Playing audio files on UNIX
  215. Playing audio files on micros
  216. The Sound Site Newsletter
  217. Posting sounds
  218.  
  219. Appendices:
  220.  
  221.   FTP access for non-internet sites
  222.   AIFF Format (Audio IFF)
  223.   The NeXT/Sun audio file format
  224.   IFF/8SVX Format
  225.   Playing sound on a PC
  226.   The EA-IFF-85 documentation
  227.   US Federal Standard 1016 availability
  228.   Creative Voice (VOC) file format
  229.   RIFF WAVE (.WAV) file format
  230.   U-LAW and A-LAW definitions
  231.   AVR File Format
  232.  
  233.  
  234. Introduction
  235. ------------
  236.  
  237. This is version 2 of this FAQ, which I started in November 1991 under
  238. the name "The audio formats guide".  I bumped the major version number
  239. since the Subject and Newsgroups headers have changed to make the
  240. subject more informative and give the guide a wider audience.  I also
  241. added a Table of contents section at the top.
  242.  
  243. I am posting this about once a fortnight, either unchanged (just to
  244. inform new readers), or updated (if I learn more or when new hardware
  245. or software becomes popular).  I post to alt.binaries.sounds.{misc,d}
  246. and to comp.dsp, for maximal coverage of people interested in audio,
  247. and to news.answers, for easy reference.
  248.  
  249. A companion posting with subject "Change to: ..." is occasionally
  250. posted listing the diffs between a new version and the last.  This is
  251. not reposted, and it is suppressed when the diffs are bigger than the
  252. new version.
  253.  
  254. NEWSFLASH: This FAQ is now also available in distributed hypertext
  255. form!  If you have a WWW browser and direct Internet access you can
  256. point it to "http://voorn.cwi.nl/audio-formats/a00.html".  (WWW is the
  257. CERN World-Wide Web initiative; for more info, telnet or ftp to
  258. info.cern.ch.)
  259.  
  260. Send updates, comments and questions to <guido@cwi.nl>; flames to
  261. /dev/null.
  262.  
  263. I'd like to thank everyone who sent me mail with updates for previous
  264. versions.  The list of names is really too long to list you all...
  265.  
  266.   --Guido van Rossum, CWI, Amsterdam <guido@cwi.nl>
  267.   "Lobster thermidor aux crevettes with a mornay sauce garnished with
  268.   truffle pate, brandy and a fried egg on top and spam"
  269.  
  270.  
  271. Device characteristics
  272. ----------------------
  273.  
  274. In this text, I will only use the term "sample" to refer to a single
  275. output value from an A/D converter, i.e., a small integer number
  276. (usually 8 or 16 bits).
  277.  
  278. Audio data is characterized by the following parameters, which
  279. correspond to settings of the A/D converter when the data was
  280. recorded.  Naturally, the same settings must be used to play the data.
  281.  
  282. - sampling rate (in samples per second), e.g. 8000 or 44100
  283.  
  284. - number of bits per sample, e.g. 8 or 16
  285.  
  286. - number of channels (1 for mono, 2 for stereo, etc.)
  287.  
  288. Approximate sampling rates are often quoted in Hz or kHz ([kilo-]
  289. Hertz), however, the politically correct term is samples per second
  290. (samples/sec).  Sampling rates are always measured per channel, so for
  291. stereo data recorded at 8000 samples/sec, there are actually 16000
  292. samples in a second.  I will sometimes write 8 k as a shorthand for
  293. 8000 samples/sec.
  294.  
  295. Multi-channel samples are generally interleaved on a frame-by-frame
  296. basis: if there are N channels, the data is a sequence of frames,
  297. where each frame contains N samples, one from each channel.  (Thus,
  298. the sampling rate is really the number of *frames* per second.)  For
  299. stereo, the left channel usually comes first.
  300.  
  301. The specification of the number of bits for U-LAW (pronounced mu-law
  302. -- the u really stands for the Greek letter mu) samples is somewhat
  303. problematic.  These samples are logarithmically encoded in 8 bits,
  304. like a tiny floating point number; however, their dynamic range is
  305. that of 14 bit linear data.  Source for converting to/from U-LAW
  306. (written by Jef Poskanzer) is distributed as part of the SOX package
  307. mentioned below; it can easily be ripped apart to serve in other
  308. applications.  The official definition is the CCITT standard G.711.
  309.  
  310. There exists another encoding similar to U-LAW, called A-LAW, which
  311. is used as a European telephony standard.  There is less support for
  312. it in UNIX workstations.
  313.  
  314. (See the Appendix for some formulae describing U-LAW and A-LAW.)
  315.  
  316.  
  317. Popular sampling rates
  318. ----------------------
  319.  
  320. Some sampling rates are more popular than others, for various reasons.
  321. Some recording hardware is restricted to (approximations of) some of
  322. these rates, some playback hardware has direct support for some.  The
  323. popularity of divisors of common rates can be explained by the
  324. simplicity of clock frequency dividing circuits :-).
  325.  
  326. Samples/sec     Description
  327.  
  328. 5500            One fourth of the Mac sampling rate (rarely seen).
  329.  
  330. 7333            One third of the Mac sampling rate (rarely seen).
  331.  
  332. 8000            Exactly 8000 samples/sec is a telephony standard that
  333.                 goes together with U-LAW (and also A-LAW) encoding.
  334.                 Some systems use an slightly different rate; in
  335.                 particular, the NeXT workstation uses 8012.8210513,
  336.                 apparently the rate used by Telco CODECs.
  337.  
  338. 11 k            Either 11025, a quarter of the CD sampling rate,
  339.                 or half the Mac sampling rate (perhaps the most
  340.                 popular rate on the Mac).
  341.  
  342. 16000           Used by, e.g. the G.722 compression standard.
  343.  
  344. 18.9 k          CD-ROM/XA standard.
  345.  
  346. 22 k            Either 22050, half the CD sampling rate, or the Mac
  347.                 rate; the latter is precisely 22254.545454545454 but
  348.                 usually misquoted as 22000.  (Historical note:
  349.                 22254.5454... was the horizontal scan rate of the
  350.                 original 128k Mac.)
  351.  
  352. 32000           Used in digital radio, NICAM (Nearly-Instantaneous
  353.                 Companded Audio Multiplex [IBA/BREMA/BBC]) and other
  354.                 TV work, at least in the UK; also long play DAT and
  355.                 Japanese HDTV.
  356.  
  357. 37.8 k          CD-ROM/XA standard for higher quality.
  358.  
  359. 44056           This weird rate is used by professional audio
  360.                 equipment to fit an integral number of samples in a
  361.                 video frame.
  362.  
  363. 44100           The CD sampling rate.  (DAT players recording
  364.                 digitally from CD also use this rate.)
  365.  
  366. 48000           The DAT (Digital Audio Tape) sampling rate for
  367.                 domestic use.
  368.  
  369. Files samples on SoundBlaster hardware have sampling rates that are
  370. divisors of 1000000.
  371.  
  372. While professinal musicians disagree, most people don't have a problem
  373. if recorded sound is played at a slightly different rate, say, 1-2%.
  374. On the other hand, if recorded data is being fed into a playback
  375. device in real time (say, over a network), even the smallest
  376. difference in sampling rate can frustrate the buffering scheme used...
  377.  
  378. There may be an emerging tendency to standardize on only a few
  379. sampling rates and encoding styles, even if the file formats may
  380. differ.  The suggested rates and styles are:
  381.  
  382.     rate (samp/sec) style mono/stereo
  383.  
  384.     8000 8-bit U-LAW mono
  385.     22050 8-bit linear unsigned mono and stereo
  386.     44100 16-bit linear signed mono and stereo
  387.  
  388.  
  389. Compression schemes
  390. -------------------
  391.  
  392. Strange though it seems, audio data is remarkably hard to compress
  393. effectively.  For 8-bit data, a Huffman encoding of the deltas between
  394. successive samples is relatively successful.  For 16-bit data,
  395. companies like Sony and Philips have spent millions to develop
  396. proprietary schemes.
  397.  
  398. Public standards for voice compression are slowly gaining popularity,
  399. e.g. CCITT G.721 and G.723 (ADPCM at 32 and 24 kbits/sec).  (ADPCM ==
  400. Adaptive Delta Pulse Code Modulation.)  Free source code for a *fast*
  401. 32 kbits/sec ADPCM algorithm is available by ftp from ftp.cwi.nl as
  402. /pub/adpcm.shar.  (** NOTE: if you are using v1.0, you should get
  403. v1.1, released 17-Dec-1992, which fixes a serious bug -- the quality
  404. of v1.1 is claimed to be better than uLAW **)
  405.  
  406. There are also two US federal standards, 1016 (Code excited linear
  407. prediction (CELP), 4800 bits/s) and 1015 (LPC-10E, 2400 bits/s).  See
  408. also the appendix for 1016.
  409.  
  410. (Note that U-LAW and silence detection can also be considered
  411. compression schemes.)
  412.  
  413. Here's a note about audio codings by Van Jacobson <van@ee.lbl.gov>:
  414. Several people used the words "LPC" and "CELP" interchangably.  They
  415. are very different.  An LPC (Linear Predictive Coding) coder fits
  416. speech to a simple, analytic model of the vocal tract, then throws
  417. away the speech & ships the parameters of the best-fit model.  An LPC
  418. decoder uses those parameters to generate synthetic speech that is
  419. usually more-or-less similar to the original.  The result is
  420. intelligible but sounds like a machine is talking.  A CELP (Code
  421. Excited Linear Predictor) coder does the same LPC modeling but then
  422. computes the errors between the original speech & the synthetic model
  423. and transmits both model parameters and a very compressed
  424. representation of the errors (the compressed representation is an
  425. index into a 'code book' shared between coders & decoders -- this is
  426. why it's called "Code Excited").  A CELP coder does much more work
  427. than an LPC coder (usually about an order of magnitude more) but the
  428. result is much higher quality speech: The FIPS-1016 CELP we're working
  429. on is essentially the same quality as the 32Kb/s ADPCM coder but uses
  430. only 4.8Kb/s (the same as the LPC coder).
  431.  
  432. Finally, the comp.compression FAQ has some text on the 6:1 audio
  433. compression scheme used by MPEG (a video compression standard-to-be).
  434. It's interesting to note that video compression reaches much higher
  435. ratios (like 26:1).  This FAQ is ftp'able from rtfm.mit.edu
  436. [18.72.1.58] in directory /pub/usenet/news.answers/compression-faq,
  437. files part1 and part2.
  438.  
  439. Comp.compression also carries a regular posting "How to uncompress
  440. anything" by David Lemson <lemson@uiuc.edu>, which (tersely) hints on
  441. which program you need to uncompress a file whose name ends in .<foo>
  442. for almost any conceivable <foo>.  Ftp'able from ftp.cso.uiuc.edu
  443. (128.174.5.59) in the directory /doc/pcnet as the file compression.
  444.  
  445.  
  446. Current hardware
  447. ----------------
  448.  
  449. I am aware of the following computer systems that can play back and
  450. (sometimes) record audio data, with their characteristics.  Note that
  451. for most systems you can also buy "professional" sampling hardware,
  452. which supports much better quality, e.g. >= 44.1 k 16 bits stereo.
  453. The characteristics listed here are a rough estimate of the
  454. capabilities of the basic hardware only (and even here I am on thin
  455. ice, with systems becoming ever more powerful).
  456.  
  457. machine             bits            max sampling rate    #output channels
  458.  
  459. Mac                 8               22k                  1
  460. Apple IIgs          8               32k / >70k           8(st)
  461. PC/Soundblaster v1  8               13k / 22k            1
  462. PC/Soundblaster v2  8               15k / 44.1k          1
  463. PC/PAS-16           16              44.1k                ?(st)
  464. Atari ST            8               22k                  1
  465. Atari STe,TT        8               50k                  2
  466. Atari Falcon 030    16              50k                  8(st)
  467. Amiga               8               ~29k                 4(st)
  468. Sun Sparc           U-LAW           8k                   1
  469. Sun Sparcst. 10     U-LAW,8,16      48k                  1(st)
  470. NeXT                U-LAW,8,16      44.1k                1(st)
  471. SGI Indigo          8,16            48k                  4(st)
  472. Acorn Archimedes    ~U-LAW          ~180k                8(st)
  473. Sony RISC-NEWS      8, 16           37.8k                ?(st)
  474. VAXstation 4000     U-LAW           8k                   1
  475. Tandy 1000/*L*      8-bit           22k                  3
  476.  
  477. 4(st) means "four voices, stereo"; sampling rates xx/yy are
  478. different recording/playback rates; *L* is any type with 'L' in it.
  479.  
  480. All these machines can play back sound without additional hardware,
  481. although the needed software is not always standard; only the Sun,
  482. NeXT and SGI come with standard sampling hardware (the NeXT only
  483. samples U-LAW at 8000 samples/sec from the built-in microphone port;
  484. you need a separate board for other rates).
  485.  
  486. The new VAXstation 4000 (VLC and model 60) series lets you PLAY audio
  487. (.au) files, and the package DECsound will let you do the recording.
  488. In fact, DECsound is given away free with Motif 1.1 and supports the
  489. VAXstation, Sun SPARCstation, DECvoice, and XMedia audio devices.  Sun
  490. sound files work without change.
  491.  
  492. The SGI Personal IRIS 4D/30 and 4D/35 have the same capabilities as
  493. the Indigo.
  494.  
  495. The new Apple Macs have more powerful audio hardware; the latest
  496. models have built-in microphones.
  497.  
  498. Software exists for the PC that can play sound on its 1-bit speaker
  499. using pulse width modulation (see appendix); the Soundblaster board
  500. records at rates up to 13 k and plays back up to 22 k (weird
  501. combination, but that's the way it is).
  502.  
  503. Here's some info about the newest Atari machine, the Falcon030.  This
  504. machine has stereo 16 bit CODECs and a 32 MHz Motorola 56001 that can
  505. handle 8 channels of 16 bit audio, up to 50 khz/channel with
  506. simultaneous playback and record.  The Falcon DMA sound engine is also
  507. compatible with the 8 bit stereo DMA used on the STe and TT. All of
  508. these systems use signed data.
  509.  
  510. On the NeXT, the Motorola 56001 DSP chip is programmable and you can
  511. (in principle) do what you want.  The SGI uses the same DSP chip but
  512. it can't be programmed by users -- SGI prefers to offer it as a shared
  513. system resource to multiple applications, thus enabling developers to
  514. program audio with their Audio Library and avoid code modifications
  515. for execution on future machines with different audio hardware, i.e. a
  516. different DSP.
  517.  
  518. The Amiga also has a 6-bit volume, which can be used to produce
  519. something like a 14-bit output for each voice.  The hardware can also
  520. use one of each voice-pair to modulate the other in FM (period) or AM
  521. (volume, 6-bits).
  522.  
  523. The Acorn Archimedes uses a variation on U-LAW with the bit order
  524. reversed and the sign bit in bit 0.  Being a 'minority' architecture,
  525. Arc owners are quite adept at converting sound/image formats from
  526. other machines, and it is unlikely that you'll ever encounter sound in
  527. one of the Arc's own formats (there are several).
  528.  
  529. CD-I machines form a special category.  The following formats are used:
  530.  
  531.      - PCM 44.1 kHz standard CD format
  532.      - ADPCM - Addaptive Delta PCM
  533.        - Level A 37.8 kHz 8-bit
  534.        - Level B 37.8 kHz 4-bit
  535.        - Level C 18.9 kHz 4-bit
  536.  
  537.  
  538. File formats
  539. ------------
  540.  
  541. Historically, almost every type of machine used its own file format
  542. for audio data, but some file formats are more generally applicable,
  543. and in general it is possible to define conversions between almost any
  544. pair of file formats -- sometimes losing information, however.
  545.  
  546. File formats are a separate issue from device characteristics.  There
  547. are two types of file formats: self-describing formats, where the
  548. device parameters and encoding are made explicit in some form of
  549. header, and "raw" formats, where the device parameters and encoding
  550. are fixed.
  551.  
  552. Self-describing file formats generally define a family of data
  553. encodings, where a header fields indicates the particular encoding
  554. variant used.  Headerless formats define a single encoding and usually
  555. allows no variation in device parameters (except sometimes sampling
  556. rate, which can be a pain to figure out other than by listening to the
  557. sample).
  558.  
  559. The header of self-describing formats contains the parameters of the
  560. sampling device and sometimes other information (e.g. a
  561. human-readable description of the sound, or a copyright notice).  Most
  562. headers begin with a simple "magic word".  (Some formats do not simply
  563. define a header format, but may contain chunks of data intermingled
  564. with chunks of encoding info.)  The data encoding defines how the
  565. actual samples are stored in the file, e.g. signed or unsigned, as
  566. bytes or short integers, in little-endian or big-endian byte order,
  567. etc.  Strictly spoken, channel interleaving is also part of the
  568. encoding, although so far I have seen little variation in this area.
  569.  
  570. Some file formats apply some kind of compression to the data, e.g.
  571. Huffman encoding, or simple silence deletion.
  572.  
  573. Here's an overview of popular file formats.
  574.  
  575.         Self-describing file formats
  576.         ----------------------------
  577.  
  578. extension, name   origin          variable parameters (fixed; comments)
  579.  
  580. .au or .snd       NeXT, Sun       rate, #channels, encoding, info string
  581. .aif(f), AIFF     Apple, SGI      rate, #channels, sample width, lots of info
  582. .aif(f), AIFC     Apple, SGI      same (extension of AIFF with compression)
  583. .iff, IFF/8SVX    Amiga           rate, #channels, instrument info (8 bits)
  584. .voc              Soundblaster    rate (8 bits/1 ch; can use silence deletion)
  585. .wav, WAVE        Microsoft       rate, #channels, sample width, lots of info
  586. .sf               IRCAM           rate, #channels, encoding, info
  587. none, HCOM        Mac             rate (8 bits/1 ch; uses Huffman compression)
  588. none, MIME        Internet        (see below)
  589. .mod or .nst      Amiga           (see below)
  590.  
  591. Note that the filename extension ".snd" is ambiguous: it can be either
  592. the self-describing NeXT format or the headerless Mac/PC format, or
  593. even a headerless Amiga format.
  594.  
  595. I know nothing for sure about the origin of HCOM files, only that
  596. there are a lot of them floating around on our system and probably at
  597. FTP sites over the world.  The filenames usually don't have a ".hcom"
  598. extension, but this is what SOX (see below) uses.  The file format
  599. recognized by SOX includes a MacBinary header, where the file
  600. type field is "FSSD".  The data fork begins with the magic word "HCOM"
  601. and contains Huffman compressed data; after decompression it it is 8
  602. bits unsigned data.
  603.  
  604. IFF/8SVX allows for amplitude contours for sounds (attack/decay/etc).
  605. Compression is optional (and extensible); volume is variable; author,
  606. notes and copyright properties; etc.
  607.  
  608. AIFF, AIFC and WAVE are similar in spirit but allow more freedom in
  609. encoding style (other than 8 bit/sample), amongst others.
  610.  
  611. There are other sound formats in use on Amiga by digitizers and music
  612. programs, such as IFF/SMUS.
  613.  
  614. Appendices describes the NeXT and VOC formats; pointers to more info
  615. about AIFF, AIFC, 8SVX and WAVE (which are too complex to describe
  616. here) are also in appendices.
  617.  
  618. DEC systems (e.g. DECstation 5000) use a variant of the NeXT format
  619. that uses little-endian encoding and has a different magic number
  620. (0x0064732E in little-endian encoding).
  621.  
  622. Standard file formats used in the CD-I world are IFF but on the disc
  623. they're in realtime files.
  624.  
  625. An interesting "interchange format" for audio data is described in the
  626. proposed Internet Standard "MIME", which describes a family of
  627. transport encodings and structuring devices for electronic mail.  This
  628. is an extensible format, and initially standardizes a type of audio
  629. data dubbed "audio/basic", which is 8-bit U-LAW data sampled at 8000
  630. samples/sec.
  631.  
  632. Finally, a format that doesn't really belong here are "MOD" files,
  633. usually with extension ".mod" or ".nst" (on PCs, that is -- on Amigas
  634. they have a *prefix* of "mod.").  These files are short clips of
  635. sounds with sequencing information.  This makes for fairly compact
  636. files but is limitted to making music with samples of a piano and
  637. trumpet, etc.
  638.  
  639.         Headerless file formats
  640.         -----------------------
  641.  
  642. extension       origin          parameters
  643. or name
  644.  
  645. .snd, .fssd     Mac, PC         variable rate, 1 channel, 8 bits unsigned
  646. .ul             US telephony    8 k, 1 channel, 8 bit "U-LAW" encoding
  647. .snd?           Amiga           variable rate, 1 channel, 8 bits signed
  648.  
  649. It is usually easy to distinguish 8-bit signed formats from unsigned
  650. by looking at the beginning of the data with 'od -b <file | head';
  651. since most sounds start with a little bit of silence containing small
  652. amounts of background noise, the signed formats will have an abundance
  653. of bytes with values 0376, 0377, 0, 1, 2, while the unsigned formats
  654. will have 0176, 0177, 0200, 0201, 0202 instead.  (Using "od -c" will
  655. also show any headers that are tacked in front of the file.)
  656.